docs/tools/shooter.c: Use accessor functions to access GtkWidget
authorJavier Jardón <jjardon@gnome.org>
Sun, 15 Aug 2010 22:35:56 +0000 (00:35 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sun, 22 Aug 2010 16:29:02 +0000 (18:29 +0200)
docs/tools/shooter.c

index eef624215fda85766a7d11b95dfe9d5c1185cfa6..0ed618262768bf2eaaf91547d048045b579c1b50 100644 (file)
@@ -193,6 +193,7 @@ int main (int argc, char **argv)
 
   for (node = toplevels; node; node = g_list_next (node))
     {
+      GtkAllocation allocation;
       GdkWindow *window;
       WidgetInfo *info;
       XID id;
@@ -202,13 +203,14 @@ int main (int argc, char **argv)
 
       gtk_widget_show (info->window);
 
-      window = info->window->window;
+      window = gtk_widget_get_window (info->window);
+      gtk_widget_get_allocation (info->window, &allocation);
 
       gtk_widget_show_now (info->window);
       gtk_widget_queue_draw_area (info->window,
-        info->window->allocation.x, info->window->allocation.y,
-        info->window->allocation.width, info->window->allocation.height);
-      gdk_window_process_updates (info->window->window, TRUE);
+                                  allocation.x, allocation.y,
+                                  allocation.width, allocation.height);
+      gdk_window_process_updates (window, TRUE);
 
       while (gtk_events_pending ())
        {